package com.coderman.infosys.user.api.facade;

import com.coderman.infosys.user.api.dto.request.DepartmentQueryDTO;
import com.coderman.infosys.user.api.dto.response.DepartmentDTO;
import com.coderman.utils.response.ResultDataDto;

import java.util.List;

/**
 * Description:
 * date: 2021/12/18
 *
 * @author shenshuai
 * @version 1.0.0
 * @since JDK 1.8
 */
public interface DepartmentQueryFacade {
    /**
     * 查询所有部门信息
     * @param departmentQueryDTO
     * @return
     */
    List<DepartmentDTO> queryAllDepartment(DepartmentQueryDTO departmentQueryDTO);

    /**
     * 根据ID查询部门信息
     * @param id
     * @return
     */
    DepartmentDTO queryById(Long id);


    /**
     * 根据code查询部门信息
     * @param code
     * @return
     */
    ResultDataDto<DepartmentDTO> queryByCode(String code);

    /**
     * 根据父级ID查询部门信息
     * @param superId
     * @param loadSuperAll
     * @return
     */
    ResultDataDto<List<DepartmentDTO>> queryBySuperId(Long superId,boolean loadSuperAll);


    List<DepartmentDTO> queryByParentId(Long parentId);


}
